/*
 * Hardware.cpp
 *
 *  Created on: 27-mrt-2012
 *      Author: Bart
 */

#include "Hardware.h"

/************************** Variable Definitions *****************************/
/*
 * Instance of the interruptController.
 *
 * !Note: only one interruptController is used in this setup.
 */
XIntc InterruptController;


/************************** Function Prototypes ******************************/


/*****************************************************************************/
/*
 *      Functions
 *
 *****************************************************************************/
int initialize_InterruptController(){
	int Status;

	InterruptController.BaseAddress = INTC_BASEADDR;
	Status = XIntc_Initialize(&InterruptController, INTC_DEVICE_ID);

	return Status;
}

int startInterrupt(){
	int Status;

	Status = XIntc_Start(&InterruptController, XIN_REAL_MODE);

	return Status;

}

XIntc * getInterruptController(){
	return &InterruptController;
}

